package com.yanqu.road.entity.activity.jinli;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_c_jinli_data")
public class CrossJinLiData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "商品ID", update = true)
    private int mallId;

    @FieldTypeAnnotation(desc = "当前的幸运数字")
    private int luckyNum;

    @FieldTypeAnnotation(desc = "幸运签总数量")
    private int totalNum;

    @FieldTypeAnnotation(desc = "抽到的幸运签数字列表")
    private List<Integer> luckyNumList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "发奖标识")
    private boolean isReward;

    @FieldTypeAnnotation(desc = "更新时间")
    private long updateTime;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getMallId() {
        return mallId;
    }

    public void setMallId(int mallId) {
        if (this.mallId != mallId) {
            this.mallId = mallId;
            setOp(DataStatus.Update);
        }
    }

    public int getLuckyNum() {
        return luckyNum;
    }

    public void setLuckyNum(int luckyNum) {
        if (this.luckyNum != luckyNum) {
            this.luckyNum = luckyNum;
            setOp(DataStatus.Update);
        }
    }

    public int getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(int totalNum) {
        if (this.totalNum != totalNum) {
            this.totalNum = totalNum;
            setOp(DataStatus.Update);
        }
    }

    public List<Integer> getLuckyNumList() {
        return luckyNumList;
    }

    public void setLuckyNumList(List<Integer> luckyNumList) {
        if (luckyNumList == null) {
            return;
        }
        this.luckyNumList = luckyNumList;
        setOp(DataStatus.Update);
    }

    public boolean isReward() {
        return isReward;
    }

    public void setReward(boolean reward) {
        if (this.isReward != reward) {
            this.isReward = reward;
            setOp(DataStatus.Update);
        }
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        if (this.updateTime != updateTime) {
            this.updateTime = updateTime;
            setOp(DataStatus.Update);
        }
    }
}
